import request from '@/router/axios';

export const getList = () => {
    return request({
        url: '/api/user-api/mx-org/tree',
        method: 'get',
        params: {}
    })
}

export const insertDept = (data) => {
    return request({
        url: '/api/user-api/mx-org/insert',
        method: 'post',
        data: {...data}
    })
}

export const updateDept = (data) => {
    return request({
        url: '/api/user-api/mx-org/update',
        method: 'post',
        data: {...data}
    })
}

export const detail = (params) => {
    return request({
        url: '/api/user-api/mx-org/detail',
        method: 'get',
        params: {...params}
    })
}

export const del = (params) => {
    return request({
        url: '/api/user-api/mx-org/delete',
        method: 'post',
        params
    })
}

export const importData = (data) => {
    return request({
        url: '/api/user-api/mx-org/import',
        method: 'post',
        data
    })
}

export const importTemplate = () => {
    return request({
        url: '/api/user-api/mx-org/import-template',
        method: 'get',
        responseType:"blob"
    })
}
